import request from '@/util/request'
import type { CodeResult, LoginParam, Token } from './types'
const API: string = '/auth-service'
import qs from 'qs';
/**验证接口 */

export const getCode = () => {
    return request<CodeResult, CodeResult>({
        url: API + '/code/getCode',
        method: 'get'
    })
}

/**登录接口 */
export const login = (data: LoginParam) =>
    request<Token, Token>({
        url: API + '/user/login',
        method: 'post',
        data: qs.stringify(data),//转成键值对
    })




